import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/shop',
  component: Layout,
  redirect: '/shop/index',
  name: 'shop',
  meta: {
    title: '店铺管理',
    icon: 'material-symbols:store-outline',
  },
  children: [
    {
      path: 'index',
      name: 'shopIndex',
      component: () => import('@/views/shop/index.vue'),
      meta: {
        title: '店铺管理',
        auth: ['permission.browse'],
        menu: false,
        activeMenu: '/shop',
      },
    },
    {
      path: 'detail',
      name: 'shopDetail',
      component: () => import('@/views/shop/detail.vue'),
      meta: {
        title: '店铺管理配置',
        auth: ['permission.browse'],
        menu: false,
        activeMenu: '/shop',
      },
    },
  ],
}

export default routes
